package com.appoint.buss.service.impl;

import java.util.List;
import java.util.Map;

import com.appoint.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.appoint.buss.mapper.EpiparaLatestMapper;
import com.appoint.buss.domain.EpiparaLatest;
import com.appoint.buss.service.IEpiparaLatestService;

/**
 * LatestService业务层处理
 *
 * @author appoint
 * @date 2023-01-01
 */
@Service
public class EpiparaLatestServiceImpl implements IEpiparaLatestService
{
    @Autowired
    private EpiparaLatestMapper epiparaLatestMapper;

    /**
     * 查询Latest
     *
     * @param id Latest主键
     * @return Latest
     */
    @Override
    public EpiparaLatest selectEpiparaLatestById(Long id)
    {
        return epiparaLatestMapper.selectEpiparaLatestById(id);
    }

    /**
     * 查询Latest列表
     *
     * @param epiparaLatest Latest
     * @return Latest
     */
    @Override
    public List<EpiparaLatest> selectEpiparaLatestList(EpiparaLatest epiparaLatest)
    {
        return epiparaLatestMapper.selectEpiparaLatestList(epiparaLatest);
    }

    /**
     * 新增Latest
     *
     * @param epiparaLatest Latest
     * @return 结果
     */
    @Override
    public int insertEpiparaLatest(EpiparaLatest epiparaLatest)
    {
        epiparaLatest.setCreateTime(DateUtils.getNowDate());
        return epiparaLatestMapper.insertEpiparaLatest(epiparaLatest);
    }

    /**
     * 修改Latest
     *
     * @param epiparaLatest Latest
     * @return 结果
     */
    @Override
    public int updateEpiparaLatest(EpiparaLatest epiparaLatest)
    {
        epiparaLatest.setUpdateTime(DateUtils.getNowDate());
        return epiparaLatestMapper.updateEpiparaLatest(epiparaLatest);
    }

    /**
     * 批量删除Latest
     *
     * @param ids 需要删除的Latest主键
     * @return 结果
     */
    @Override
    public int deleteEpiparaLatestByIds(Long[] ids)
    {
        return epiparaLatestMapper.deleteEpiparaLatestByIds(ids);
    }

    /**
     * 删除Latest信息
     *
     * @param id Latest主键
     * @return 结果
     */
    @Override
    public int deleteEpiparaLatestById(Long id)
    {
        return epiparaLatestMapper.deleteEpiparaLatestById(id);
    }

    @Override
    public List<Map<String, Object>> list3() {
        return epiparaLatestMapper.queryDataStatistics();
    }
}
